package com.biostime.rpc.terminal;

public enum ResponseCode {
	SUCCESS						("100", "成功"),
	UPDATE						("101", "请更新接口"),
	ENTITY_NOTFOUND				("102", "没有找到指定对象"), 
	INTERFACE_DISABLE			("103", "停用的接口"),
	SERVER_ERROR				("201", "服务器出错"), 
	INVALID_DATE				("202", "无效的日期"), 
	INVALID_REQUEST				("203", "无效的请求"),
	INVALID_PAGE				("204", "无效的分页数"),
	INVALID_PAGESIZE			("205", "无效的分页行值"),
	INVALID_BEGINTIME			("206", "无效的开始时间"),
	INVALID_ENDTIME				("207", "无效的结束时间"),
	LACK_UPDATED_BY             ("208", "缺少更新的用户"),
	LACK_CREATED_BY             ("209", "缺少创建的用户"),
	ILLEGAL_REQUEST             ("210", "非法请求"),
	
	SKUTYPE_ERROR				("300", "sku类型匹配错误"),
	TERMINALCODE_NOTFOUND		("301", "没有找到关联门店对象"),
	PARAMETER_IS_NULL			("302", "参数对象为null"),
	SKU_ERROR					("303", "sku错误"),
	BARCODE_IS_NULL			    ("304", "barCode不能为空"),
	FILENAME_IS_NULL			("305", "文件名不能为空"),
	SKU_PRICE_LESS_THAN_ZERO    ("306", "sku的建议零售价不能小于零"),
	SKU_PRICEDISCOUNTED_LESS_THAN_ZERO  ("307", "sku的优惠价售价不能小于零"),
	SKU_EXCHANGEPOINT_LESS_THAN_ZERO    ("308", "sku的兑换积分不能小于零"),
	SKU_ISBUY_ERROR             ("309", "sku设置可购买，建议零售价和优惠价不能小于等于零"),
	SKU_ISEXCHANGE_ERROR        ("310", "sku设置可兑换，兑换积分不能小于等于零"),
	SKU_IS_REPEAT               ("311", "相同skuID重复出现了"),
	SKU_IS_DELETE               ("312", "sku以逻辑删除"),
	SKU_IS_NO_EXIST             ("313", "sku不存在"),
	SKU_IS_TERMINAL             ("314", "sku是门店自有商品无法添加到其他门店"),
	SKU_STATUS_ERROR            ("315", "审核不能过的商品不能上架"),
	
	INVALID_BRAND				("400", "不合法的品牌对象"),
	BRAND_NAME_EXISTS			("401","品牌中文名称已存在"),
	BRAND_ENAME_EXISTS          ("402","品牌英文名称已存在"),
	BRAND_COUNT_EXISTS          ("403","品牌合并需要1个以上的品牌"),
	BRAND_NAME_IS_NULL          ("404","品牌名字为空"),
	BRAND_ERROR                 ("405","品牌错误"),
	BRAND_IS_APPROVE_PASS       ("406","该品牌以审核通过无法修改"),
	BRAND_IS_TERMINAL_ADD       ("407","该品牌非该门店上传的,无法修改"),
	
	CATEGORY_ERROR				("500", "cagetory错误"),
	CATEGORY_NOTFOUND			("501", "没有找到cagetory对象"),
	THEMEID_ERROR               ("502", "分类主题错误"),
	
	CATEGORY_DELETE_ERROR_SUB               ("503", "分类下有未删除的子类"),
	CATEGORY_DELETE_ERROR_SPU               ("504", "分类下有未删除的产品"),
	
	ATTRIBUTE_ERROR				("600", "attibute错误"),
	ATTRIBUTE_NAME_EXISTS		("601", "属性名称已存在"),
	
	TERMINAL_ERROR				("700", "terminal错误"),
	TERMINAL_NOTFOUND			("701", "门店编号不存在"),
	PROVINCE_ERROR				("702", "省编码错误"),
	CHAIN_NOTFOUND			    ("703", "连锁编码错误"),
	TERMINALSKU_FOUND	        ("704", "门店商品已存"),
	QUERY_REQUEST               ("705", "缺少添加商品的查询条件"),
	CITY_ERROR				    ("706", "市编码错误"),
	TERMINAL_IS_NULL	        ("707", "门店编码不能为空"),
	PROVINCE_IS_NUll            ("708", "省编码不能为空"),
	CITY_IS_NUll                ("709", "市编码不能为空"),
	CHAIN_IS_NUll               ("710", "连锁编码不能为空"),
	STOCK_ERROR                 ("711", "库存错误"),
	CAN_NOT_IS_CHAINCODE        ("712", "不能是连锁编码"),
	CHAINCODE_NOTFOUND          ("713", "连锁不存在"),
	TERMINAL_CAN_NOT_USE        ("714", "门店已撤销或冻结"),
	TERMINALSKU_NOTFOUND		("715", "没有找到TerminalSKU对象"),
	ISRECOMMEND_ERROR           ("716", "tspu的是否推荐参数错误"),
	TERMINALSKU_STOCK_IS_MINUS  ("717", "门店sku库存扣减后为负数"),
	TERMINAL_REPETITION			("718", "门店编号重复"),
	TERMINAL_IS_NOT_VIRTUAL		("719", "该商品不可代销"),
	TERMINALSKU_IS_STATUS_DOWN  ("720", "该商品已下架的,门店无法上架"),	
	AGENTSPU_NOTFOUND           ("721", "该代销商品不存在"),	
	AGENTSPU_IS_STATUS_DOWN     ("722", "该商品已下架,门店无法设为推荐"),
	TERMINAL_AGENT_IS_NOT_STATUS_UP("723", "该商品不可代销,门店无法上架"),
	TERMINAL_IS_MAGELLAN 		("724", "不能是海淘虚拟门店"),
	
	SPU_ERROR					("801", "spu错误"),
	TERMINALSPU_ID_ERROR        ("802", "TerminalSPU的主键id错误"),
	TERMINALSPU_NOTFOUND		("803", "没有找到TerminalSPU对象"),
	MODEL_VALUE_IS_NULL         ("804", "型号值不能为空"),
	SPUTYPE_IS_NULL 			("805", "spu类型不能为空"),
	SPU_IS_TERMINAL             ("806", "spu是门店自由商品无法添加到其他门店"),
	SPU_IS_DELETE               ("807", "spu以逻辑删除"),
	INSERT_TSKU_WAIT            ("808", "上一批发商品的数据正在处理中，请稍后再试。。。"),
	STOCK_TSKU_WAIT             ("809", "上一批修改库存的数据正在处理中，请稍后再试。。。"),
	UPDATE_TSKU_WAIT            ("810", "上一批发商品的数据正在处理中，请稍后再试。。。"),
	ISRECOMMEND_COUNT_OVER      ("811", "，该门店以推荐的商品以超过6个"),
	
	PRIMARY_KEY_FOUND			("1001", "主键冲突"),
	BEYOUD_COLUMN_MAX_LENGTH	("1002", "超过列的最大长度"),
	COLUMN_TYPE_ERROR			("1003", "列类型错误"),
	COLUMN_NOT_NULL				("1004", "列值不能为空"),
	
	SPU_NAME_IS_NULL			("2001", "spu name不能为空"),
	SPU_CREATEDBY_IS_NULL		("2002", "spu createdby不能为空"),
	SPU_UPDATEDBY_IS_NULL		("2003", "spu updatedby不能为空"),
	SPU_SPUTYPE_IS_NULL			("2004", "spu spuType不能为空"),
	SPU_BARCODE_IS_NULL			("2005", "spu barCode不能为空"),
	SPU_Status_detele           ("2006", "spu已经删除"),
	
	ERROR_ARGS 					("445","参数错误"),
	UPDATE_FAIL                 ("446","更新失败"),
	ADD_FAIL 					("447","添加失败"),
	QUERY_FAIL                  ("448","查询失败"),
	VERIFICATION_FAIL           ("449","参数校验失败");
	
	private String respCode = ""; 
	private String respDesc = "";

	ResponseCode(String code, String desc) {
		this.respCode = code;
		this.respDesc = desc;
	}
	
	public String getCode() {
		return this.respCode;
	}
	public String getDesc() {
		return this.respDesc;
	}
}
